<link rel="stylesheet" href="css/caseBarSchedule.css">

<!--团队-->

<div class="wrap" style="background: #f5f5f5;position: relative;top: 7px;">
  <div class="y-team" style="position: absolute;top: 10px;">
    <!--top-->
    <div class="y-nav clearfix" style="position: relative;margin-left: 20px">
      <h3 class="fl manage" style="margin-top: 10px"><a href="javascript:;">客户管理</a></h3>
      <div class="z-Customer-nav  fl" >
        <ul class="clearfix">
          <li class="fl" value="1" ng-click="customerTabShowT()" ng-class="{'active':tabShow==0}">自然人</li>
          <li class="fl" value="2"  ng-click="selectFaRenInfoList();personActive=1" ng-class="{'active':tabShow==1}">企业</li>
        </ul>
      </div>
      <a class="fr request"  data-toggle="modal" data-target="#myModalCust" ng-click="createEmpty();personalForm.reset();companyForm.reset()" >添加客户</a>
    </div>

    <!--客户管理-->
    <div class="y-content-box clearfix" style="margin-top: 10px; position: relative; margin-left:20px ">

      <!--左边menu-->
      <div class="y-content2-lawyer fl wt-scroll" style="height:100%;background: #fff;">
        <!--自然人-->
        <div ng-show="tabShow==0">
          <dl class="sidebar-content clearfix" >
            <dt class="fl">
              <a href="JavaScript:void(0);">
                <!--<i class="fa fa-user-o" aria-hidden="true"> </i>-->
                <i class="iconfont" style="font-size: 20px;margin-left:18px;margin-top:5px;"> &#xe6b0;</i>
                <!--<img src="img/d_ClientIcon.svg" alt="">-->
                <span style="margin-left:18px">客户分组</span>
              </a>
              <!--<span class="floatR">{{customerListNum}}</span>-->
            </dt>
            <dd class="fl L_groupList" style="position: relative;" ng-repeat="item in customerList" ng-class="{'active':listActive == item.customerGroupId}" ng-click="getCustomerLeft(item.customerGroupName,item.customerGroupId)">
              <!--<input type="text" class="groupInput" ng-if="item.customerGroupId>0" ng-model="item.customerGroupName" >-->
              <span class="sidebar-con-Sp" ng-class="{'sidebar-con-Spb':listActive == item.customerGroupId}"></span>
              <span class="fl" style="margin-left:54px;">
                <a href="JavaScript:void(0);" ng-show="!item.editGroup" style="padding-left:0" class="floatL" title="{{item.customerGroupName}}">{{item.customerGroupName}}</a>
                    <!--<input maxlength="50" class="editCustomGrup" style="width: 225px;height: 50px;padding: 0px 10px 0px 10px;position: relative;z-index: 9999" type="text" ng-show="item.editGroup" ng-model="item.customerGroupName" ng-click="$event.stopPropagation();" ng-enter="saveEditGroup(item)"/>-->
              </span>
              <span class="fl" style=" margin-left:5px;">（{{item.cnt}}）</span>
              <span class="list-show dropdown-toggle" id="perDLabel" data-toggle="dropdown" aria-haspopup="true" style="cursor: pointer;" ng-if="item.customerGroupId>0" ng-click="item.dropdownShow = !item.dropdownShow">
            <i class="iconfont icon">&#xe6c3;</i>
          </span>
              <!--自然人下拉菜单-->
              <div class="setting-case" ng-show="item.dropdownShow" style="display: none">
                <div class="setting-case-con">
                  <p class="set-pic1" ng-click="editGroupPort(item)">编辑分组</p>
                  <p class="set-pic2" ng-click="deleteGroup($index,item)">删除分组</p>
                </div>
              </div>

              <div class="editStagePer dropdown"  role="menu"  aria-labelledby="perDLabel">
                <div class="editStageTitle tc" style="border-bottom: 1px solid #DBD6CD;font-size: 16px">功能菜单 <span class="pull-right">
              <i class="icon iconfont" ng-click="removeBox($event)">&#xe66e;</i></span>
                </div>
                <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="editGroupPortSec(item,tabShow)">
                  <span><i class="icon iconfont">&#xe670;</i></span>重命名</p>
                <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteGroup($index,item)">
                  <span><i class="icon iconfont">&#xe623;</i></span>删除</p>
              </div>

            </dd>
          </dl>
        </div>
        <!--机构-->
        <div ng-show="tabShow==1">
          <!--机构-->
          <dl class="sidebar-content clearfix" ng-show="tabShow == 1">
            <dt class="fl">
              <!--<i class="fa fa-user-o" aria-hidden="true"></i>-->
              <i class="iconfont" style="font-size: 20px;margin-left:18px;"> &#xe6b0;</i>
              <span style="margin-left:18px">机构分组</span>
              <!--{{customerListNum2}}-->
            </dt>
            <dd class="fl L_groupList" style="position: relative; padding-left:0px" ng-repeat="item in customerList2" ng-class="{'active':listActive2 == item.customerGroupId}" ng-click="getCustomerLeft2(item.customerGroupName,item.customerGroupId)">
              <span class="sidebar-con-Sp" ng-class="{'sidebar-con-Spb':listActive2 == item.customerGroupId}"></span>
              <a class="fl" style="margin-left:54px"  href="JavaScript:void(0);" title="{{item.customerGroupName}} ">{{item.customerGroupName}} </a>
              <span class="fl comCnt"  style="">（{{item.cnt}}）</span>
              <span class="fr list-show dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" ng-if="item.customerGroupId>0" ng-click="item.dropdownShow = !item.dropdownShow">
            <i class="iconfont icon">&#xe6c3;</i>
            </span>
              <!--机构下拉菜单-->
              <div class="setting-case" ng-show="item.dropdownShow" style="display: none">
                <div class="setting-case-con">
                  <p class="set-pic1">编辑分组</p>
                  <p class="set-pic2">删除分组</p>
                </div>
              </div>

              <div class="editStageOr dropdown"  role="menu" aria-labelledby="dropdownMenu1">
                <div class="editStageTitle tc">功能菜单 <span class="pull-right">
              <i class="icon iconfont icon-quxiao" ng-click="removeBox($event)">&#xe66e;</i></span>
                </div>
                <p style="padding-left: 30px" class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="editGroupPortSec(item,tabShow)">
                  <span><i class="icon iconfont">&#xe670;</i></span>重命名</p>
                <p style="padding-left: 30px" class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteGroup($index,item)">
                  <span><i class="icon iconfont">&#xe623;</i></span>删除</p>
              </div>

            </dd>
          </dl>
        </div>


      </div><!-- menu end-->
      <div class=" fl createBox">
        <div class="z-CustomerBox" ng-show="createTeam">
          <input  type="hidden"  ng-model="addParams.groupId">
          <input maxlength="50" type="text" placeholder="客户分组名称" ng-model="addParams.groupName">
          <!--<input maxlength="200" type="text" placeholder="请输入组的描述" ng-model="addParams.remark">-->
          <div class="g-buttonOuter clearfix">
            <button class="save btn-bg" style="background: #00BFB5;color: #ffffff; margin-right: 0" ng-click="addCustomerGroup()">确定</button>
            <button class="box1cannel" ng-click="createTeam = false" style="background: #fff;border: 1px solid #D9D9D9;">取 消</button>
          </div>
        </div>
        <div class="z-CustomerBox" ng-show="editTeam">
          <input  type="hidden"  ng-model="addParams.groupId">
          <input maxlength="50" type="text" placeholder="客户分组名称" ng-model="addParams.groupName">
          <!--<input maxlength="200" type="text" placeholder="请输入组的描述" ng-model="addParams.remark">-->
          <div class="g-buttonOuter clearfix">
            <button class="save btn-bg" style="background: #00BFB5;color: #ffffff; margin-right: 0" ng-click="saveEditGroup()">确定</button>
            <button class="box1cannel" ng-click="editTeam=false" style="background: #fff;border: 1px solid #D9D9D9;">取 消</button>
          </div>
        </div>
        <div class="text-center" data-toggle="modal" data-target="#editAccountIncomMyModal"  id="showCre" ng-click="editGroupPort(item,2)">
          <a href="javascript:;" >
            <i class="icon iconfont" style="color: #0DB3A6">&#xe63f;</i>
            <span>新增分组</span>
          </a>
        </div>
      </div>
      <!--个人-->
      <div class="g-auto wt-scroll" ng-show="leftActive == leftLow.lawfirmid">
        <!--客户默认Default-->
        <div ng-show="showBlank"  class="y-content2-box">
          <div id="custNotOpen">
            <p></p>
            <div>
              <p style="text-align: center;font-size: 14px;color: #9C9C9C;"> 点击上方<a style="margin:0 4px;width:80px;height:30px;display:inline-block;background:#0db3a6;color:#fff;border-radius: 4px;line-height: 30px;" data-toggle="modal" data-target="#myModalCust" ng-click="createEmpty();personalForm.reset();companyForm.reset()" >添加客户</a>添加客户。</p>
            </div>
          </div>
        </div>
        <!--<div class="z-default-right" ng-show="showBlank">
          <div><img src="img/custNotOpenSamll.png" alt=""></div>
          <p>还没有客户，创建你的第一个客户吧!</p>
        </div>-->
        <!--自然人-->
        <div class="y-content2-box  wt-scroll clearfix fl" ng-show="tabShow==0 && !showBlank " style="position: relative; background: #fff">
          <ul>
            <li>
              <!--自然人搜索框-->
              <input maxlength="20" type="text" placeholder="输入您要找的客户"  class="sidebar-text" ng-model="paramsSearchP"  ng-enter="getCustomerLeft()">
            </li>
            <li class="kongTeam"></li>
          </ul>
          <div ng-show="pageSetting.totalItems" class="dataBox">
           <!-- <dl class="z-information">
              <dt>
              <div class="clearfix" style="display: block">
                <span class="z-default-pl ">姓名</span>
                <span>手机号</span>
                <span>案件数</span>
                <span>操作</span>
              </div>
              </dt>
              <dd >
                <div ng-repeat="item in zrRestult" class="clearfix naturalPersonList" style="position: relative">
                  <p data-toggle="modal" data-target="#myModalWin" ng-click="editPerson(item.customerpersonId)">
                    <span class="z-default-pl commonRow">{{item.name}}</span>
                    <span>{{item.phone}}</span>
                    <span>{{item.cnt}}</span>
                  </p>
                  <i class="icon iconfont dropdown-toggle" id="custmerUnfold"  data-toggle="dropdown" aria-haspopup="true" style="cursor: pointer;position: relative;left:23px">&#xe6b2;
                    <div class="naturalPerDropdown dropdown"  role="menu" aria-labelledby="dropdownMenu1">
                      <div class="editStageTitle tc">功能菜单 <span class="pull-right">
                        <i class="icon iconfont icon-quxiao" ng-click="removeBox($event)">&#xe66e;</i></span>
                      </div>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="createCase($event,item, 1)">
                        <span style="float: none"><i class="icon iconfont">&#xe6af;</i></span>创建案件</p>
                      <p class="stageRename" data-toggle="modal" data-target="#myModalWin" ng-click="editPerson(item.customerpersonId)">
                        <span style="float: none"><i class="icon iconfont">&#xe670;</i></span>编辑</p>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteZRRCustomer($event,$index,item.customerpersonId)">
                        <span style="float: none"><i class="icon iconfont">&#xe623;</i></span>删除</p>
                    </div>
                  </i>
                  &lt;!&ndash;<a href="JavaScript:void(0);" class="bianji"  ng-click="editPerson(item.customerpersonId)"></a>&lt;!&ndash;ng-click="editPerson(item.customerpersonId)"&ndash;&gt;&ndash;&gt;
                  &lt;!&ndash;<a href="JavaScript:void(0);" class="shanchu" ng-click="deleteZRRCustomer($event,$index,item.customerpersonId)"></a>&ndash;&gt;


                </div>
              </dd>
            </dl>-->
            <table class="table" ng-show="pageSetting.totalItems">
              <thead>
              <tr>
                <th class="col-md-4">姓名</th>
                <th>手机号</th>
                <th>案件数</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody>
              <tr ng-repeat="item in zrRestult track by $index" data-toggle="modal" data-target="#myModalWin" ng-click="editPerson(item.customerpersonId)">
                <td class="col-md-4">{{item.name}}</td>
                <td>{{item.phone}}</td>
                <td>{{item.cnt}}</td>
                <td>
                  <i class="icon iconfont dropdown-toggle" id="custmerUnfold"  data-toggle="dropdown" aria-haspopup="true" style="cursor: pointer;position: relative;">&#xe6b2;
                    <div class="naturalPerDropdown dropdown"  role="menu" aria-labelledby="dropdownMenu1">
                      <div class="editStageTitle tc">功能菜单 <span class="pull-right">
                        <i class="icon iconfont icon-quxiao" ng-click="removeBox($event)">&#xe66e;</i></span>
                      </div>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="createCase($event,item, 1)">
                        <span style="float: none"><i class="icon iconfont">&#xe6af;</i></span>创建案件</p>
                      <p class="stageRename" data-toggle="modal" data-target="#myModalWin" ng-click="editPerson(item.customerpersonId)">
                        <span style="float: none"><i class="icon iconfont">&#xe680;</i></span>编辑</p>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteZRRCustomer($event,$index,item.customerpersonId)">
                        <span style="float: none"><i class="icon iconfont">&#xe996;</i></span>删除</p>
                    </div>
                  </i>
                </td>
              </tr>
              </tbody>
            </table>

            <!--分页page-->
            <div class="pagingBox" ng-show="pageSetting.totalItems>10" style="margin: 0px;">
              <div class="ssqPagingSimple">
                <ul uib-pagination total-items="pageSetting.totalItems" ng-model="pageSetting.pageNo" items-per-page="pageSetting.pageSize" class="pagination-sm" boundary-link-numbers="true" ng-change="selectZiRanRenInfo()" max-size="8" previous-text="上一页" next-text="下一页" ></ul>
              </div>
            </div>
          </div>

          <div ng-show="!pageSetting.totalItems" style="position: absolute;margin-top: 25%;margin-left:-42px;left: 50%">
            暂无匹配数据
          </div>
        </div>

        <!--客户机构-->
        <div class="y-content2-box  wt-scroll clearfix fl" ng-show="tabShow==1 && !showBlank " style="background: #fff">
          <ul>
            <li>
              <input maxlength="20" type="text" placeholder="输入您要找的客户"  class="sidebar-text"  ng-show="tabShow == 1" ng-model="paramsSearchC" ng-enter="getCustomerLeft2()">
            </li>
            <li class="kongTeam"></li>
          </ul>
          <div  ng-show="pageSetting2.totalItems" class="dataBox">
            <!--<dl  class="mechanism-infor">
              <dt>
              <div class="clearfix">
                <span class="z-default-pl">名称</span>
                <span>联系人</span>
                <span>手机号</span>
                <span>操作</span>
              </div>
              </dt>
              <dd class="clearfix">
                <div class="z-mechanism-list clearfix" ng-repeat="item in jgResult" >
                  <p data-toggle="modal" data-target="#myModalWin" ng-click="editOrganiza(item.customercompanyId)">
                    <span class="z-default-pl commonRow">{{item.name}}</span>
                    <span class="commonRow">{{item.contactName}}</span>
                    <span>{{item.phone}}</span>
                    &lt;!&ndash;<span>{{item.cnt}}</span>&ndash;&gt;
                    &lt;!&ndash;<span class="natural-btn">&ndash;&gt;
                    &lt;!&ndash;<a href="JavaScript:void(0);" ng-click="createCase(item, 2)">创建案件</a>&ndash;&gt;
                    &lt;!&ndash;</span>&ndash;&gt;
                  </p>
                  <i class="icon iconfont data-toggle" id="organizaDLabel" data-toggle="dropdown" aria-expanded="false" style="cursor: pointer;position: relative; left:20px" aria-haspopup="true">&#xe6b2;
                    <div class="organizaDropdown dropdown"  role="menu" aria-labelledby="organizaDropdown">
                      <div class="editStageTitle tc">功能菜单 <span class="pull-right">
                        <i class="icon iconfont icon-quxiao" ng-click="removeBox($event)">&#xe66e;</i></span>
                      </div>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="createCase($event,item, 1)">
                        <span><i class="icon iconfont">&#xe86d;</i></span>创建案件</p>
                      <p class="stageRename" data-toggle="modal" data-target="#myModalWin" ng-click="editOrganiza(item.customercompanyId)">
                        <span><i class="icon iconfont">&#xe670;</i></span>编辑</p>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteFRCustomer($event,$index,item.customercompanyId)">
                        <span><i class="icon iconfont">&#xe623;</i></span>删除</p>
                    </div>
                  </i>
                  &lt;!&ndash;<a href="JavaScript:void(0);" class="bianji"  ng-click="editOrganiza(item.customercompanyId)"></a>&ndash;&gt;
                  &lt;!&ndash;<a href="JavaScript:void(0);" class="shanchu" ng-click="deleteFRCustomer($event,$index,item.customercompanyId)"></a>&ndash;&gt;
                </div>
              </dd>
            </dl>-->
            <table class="table" ng-show="pageSetting.totalItems">
              <thead>
              <tr>
                <th class="col-md-4">名称</th>
                <th>手机号</th>
                <th>联系人</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody>
              <tr ng-repeat="item in jgResult track by $index" data-toggle="modal" data-target="#myModalWin" ng-click="editOrganiza(item.customercompanyId)">
                <td class="col-md-4">{{item.name}}</td>
                <td>{{item.phone}}</td>
                <td>{{item.contactName}}</td>
                <td>
                  <i class="icon iconfont dropdown-toggle" id="organizaDLabel"  data-toggle="dropdown" aria-haspopup="true" style="cursor: pointer;position: relative;">&#xe6b2;
                    <div class="naturalPerDropdown dropdown"  role="menu" aria-labelledby="dropdownMenu1">
                      <div class="editStageTitle tc">功能菜单 <span class="pull-right">
                        <i class="icon iconfont icon-quxiao" ng-click="removeBox($event)">&#xe66e;</i></span>
                      </div>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="createCase($event,item, 1)">
                        <span style="float: none"><i class="icon iconfont">&#xe6af;</i></span>创建案件</p>
                      <p class="stageRename" data-toggle="modal" data-target="#myModalWin" ng-click="editOrganiza(item.customercompanyId)">
                        <span style="float: none"><i class="icon iconfont">&#xe680;</i></span>编辑</p>
                      <p class="stageRename" data-toggle="modal" data-target="#editAccountIncomMyModal" ng-click="deleteFRCustomer($event,$index,item.customercompanyId)">
                        <span style="float: none"><i class="icon iconfont">&#xe996;</i></span>删除</p>
                    </div>
                  </i>
                </td>
              </tr>
              </tbody>
            </table>
            <!--分页内容-->
            <div class="pagingBox" ng-show="pageSetting2.totalItems > 10" style="margin:0px">
              <div class="ssqPagingSimple">
                <ul uib-pagination total-items="pageSetting2.totalItems" ng-model="pageSetting2.pageNo" items-per-page="pageSetting2.pageSize" class="pagination-sm" boundary-link-numbers="true" ng-change="selectFaRenInfo()" max-size="8" previous-text="上一页" next-text="下一页" ></ul>
              </div>
            </div>
          </div>
          <div ng-show="!pageSetting2.totalItems">
            暂无匹配数据
          </div>
        </div>


      </div>

    </div>

  </div>
</div>
<!--最大的父级-->


<!--=====================================弹窗==========================================--!>
    <!--添加客户弹框-->
<div class="modal fade" id="myModalCust" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="z-Select">
        <!--添加客户管理弹框头部-->
        <div class="z-Select-header clearfix">
          <p class="p-title fl">请选择客户类型</p>
          <ul class="z-Select-header-content fl">
            <!--个人头像-->
            <li class="person fl" ng-click="personActive=0" ng-class="{'personActive':personActive==0}"><!--choosePersonType()-->
              <a href="JavaScript:void(0);" class="touch"></a>
              <a href="JavaScript:void(0);" class="person-btn"></a>
              <span class="person-title">个人</span>
            </li>
            <!--机构头像-->
            <li class="select fl"  ng-click="personActive=1" ng-class="{'personActive':personActive==1}">
              <a href="JavaScript:void(0);" class="touch"></a>
              <a href="JavaScript:void(0);" class="select-btn"></a>
              <span class="select-title">企业</span>
            </li>
          </ul>
          <span class="side fr" data-dismiss="modal" aria-label="Close"><a href="JavaScript:void(0);" ></a></span>
        </div>


        <!--添加客户管理弹框中心-->
        <div class="z-Select-content">
          <!--机构-->
          <form class="w5c-form" novalidate w5c-form-validate="validateOptions" name="companyForm">
            <div class="company"  ng-if="personActive==1">
              <div class="z-Select-con">
                <div class="z-Select-content-name">
                  企业名称：<input maxlength="50" type="text" name="companyName" placeholder="请输入企业名称"  class="Select-in inputStyle form-control"  required w5c-dynamic-element ng-model="paramsM.companyname" >
                  <!--ng-change="findEnterpriseList()"-->
                  <!--uib-typeahead="prise.ENTNAME for prise in findEnterpriseList($viewValue)"输入关键词后，会自动补全企业信用信息-->
                </div>
                <div class="z-Select-content-news">
                  <h4>联系人信息</h4>
                  <p><span>姓名：</span><input maxlength="25" type="text" placeholder="请输入联系人的名称" class="Select-in inputStyle form-control "  required w5c-dynamic-element name="contactname" ng-model="paramsM.contactname"></p>
                  <p><span>手机：</span><input maxlength="11" type="text" ng-model="paramsM.contactphone" placeholder="请输入联系人的手机号码" required w5c-dynamic-element name="contactphone" class="Select-in inputStyle form-control "  ng-pattern="/^1[3|4|5|7|8][0-9]{9}$/"></p>
                </div>
              </div>
              <!--添加客户管理弹窗尾部-->
              <div class="z-Select-footer">
                <div class=clearfix>
                  <p class="fl">客户分组：</p>
                  <select class="form-control fl" style="width: 380px; float: left; margin-top: 16px; margin-left: 24px;" ng-model="teamSelected" ng-change="showTeam(teamSelected)" ng-options="team.customerGroupId as team.customerGroupName for team in customerList"/>
                  <!--<ul class="select-footer-switch fl">-->
                    <!--<li  class="fl" ng-class="{'active': teamSelected == team.customerGroupId}" ng-click="showTeam(team.customerGroupId)" ng-repeat="team in customerList">-->
                      <!--{{team.customerGroupName.substring(0,1)}}-->
                    <!--</li>-->
                  <!--</ul>-->
                </div>
                <div class="select-footer-btn clearfix">
                  <button w5c-form-submit="createCompanyList()" class="active fl">添加</button>
                  <button style="width: 90px; height: 30px; " class="fl"  data-dismiss="modal">取消</button>
                </div>
              </div>
            </div >
          </form>

          <!--个人-->
          <form class="w5c-form" novalidate w5c-form-validate="validateOptions" name="personalForm">
            <div class="personal" ng-if="personActive==0">
              <div class="z-Select-con">
                <div class="z-Select-content-data1">
                  <span>姓名：</span>
                  <input maxlength="25" type="text" required w5c-dynamic-element  placeholder="请输入客户的名称" class="Select-on inputStyle form-control" name="personName" ng-model="paramsP.name">
                  <span  style="padding-left: 18px;">手机：</span>
                  <input maxlength="11" type="text" placeholder="请输入客户的手机号码" class="Select-on1 inputStyle form-control " name="personPhone" required w5c-dynamic-element ng-model="paramsP.contactnumber" ng-pattern="/^1[3|4|5|7|8][0-9]{9}$/">
                </div>
                <!--<h4>非必填，添加成功后可以继续完善</h4>-->
                <div class="z-Select-content-data2 clearfix">
                  <div class="data2-left fl">
                    <span>身份证号：</span><input maxlength="18" type="text" placeholder="请输入客户的身份证号码" w5c-dynamic-element class="Select-on inputStyle form-control " name="personIdent" ng-model="paramsP.identificationNumber" ng-pattern="/(^\d{15}$)|(^\d{17}([0-9]|X)$)/">
                    <span>工作单位：</span><input maxlength="50" type="text" class="Select-on inputStyle form-control " ng-model="paramsP.workplace" name="personWork">
                  </div>
                  <div class="data2-right fl">
                    <span>职业：</span><input maxlength="50" type="text" placeholder="请输入客户的职业" class="Select-on1 inputStyle form-control " ng-model="paramsP.profession" name="personPro">
                    <span> 住所：</span><input maxlength="50" type="text" class="Select-on1 inputStyle" ng-model="paramsP.address" name="personAddress">
                  </div>
                </div>
                <div class="z-Select-content-data3">
                      <span class="age">年龄：
                        <input   type="number" class="Select-on inputStyle form-control" w5c-dynamic-element  ng-model="paramsP.age"  name="personAge" ng-pattern="/^(?:[1-9]?\d|100)$/">
                      </span>
                  <span class="nation">民族：
                        <input maxlength="25" type="text"  class="Select-on inputStyle" ng-model="paramsP.nationality">
                      </span>
                  <span class="sex">性别：
                    <!--<input type="text"class="Select-on inputStyle">-->
                        <div class="radio sexRadio">
                          <label>
                              <input name="gender" ng-model="paramsP.sex" type="radio" class="ace" id="zman" value="0">
                              <span class="lbl"> 男</span>
                          </label>
                          <label>
                              <input name="gender" ng-model="paramsP.sex" type="radio" class="ace" id="zgirl" value="1">
                              <span class="lbl"> 女</span>
                          </label>
                        </div>
                      </span>

                </div>
              </div>

              <!--添加客户管理弹窗尾部-->
              <div class="z-Select-footer">
                <div class="clearfix">
                  <p  class="fl">客户分组：</p><!--{{teamSelected}}-->
                  <select class="form-control fl" style="width: 380px; float: left; margin-top: 16px; margin-left: 24px;" ng-model="teamSelected" ng-change="showTeam(teamSelected)" ng-options="team.customerGroupId as team.customerGroupName for team in customerList"/>
                  <!--<ul class="select-footer-switch  fl">-->
                    <!--<li  class="fl" ng-class="{'active': teamSelected == team.customerGroupId}" ng-click="showTeam(team.customerGroupId)" ng-repeat="team in customerList">-->
                      <!--{{team.customerGroupName.substring(0,1)}}-->
                    <!--</li>-->
                  <!--</ul>-->
                </div>
                <div class="select-footer-btn clearfix">
                  <button  w5c-form-submit="createPersonList()" class="footer-btn active fl">添加</button>
                  <button style="width: 90px; height: 30px;" class="fl"  data-dismiss="modal">取消</button>
                </div>
              </div>
            </div>
          </form>
        </div>

      </div>
    </div>
  </div>
</div>

<!--添加法人自然人弹框-->
<div class="modal fade" id="myModalWin" ng-click="naturalPerEditInforCancel($event)" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog">
    <div class="modal-content">
      <!--<div class="modal-header">-->
      <div class="z-Basic clearfix">
        <div class="z-Basic-left floatL">
          <!--法人自然人头部-->
          <div class="z-Basic-header clearfix">
            <!--自然人-->
            <div class="individual fl">
              <h4 class="font-col fl">{{editNaturalPersonInfo.name}}</h4>
            </div>
            <!--机构-->
            <div class="enterprise fl">
              <h4 class="font-col fl">{{editOrganizaInfor.name}}</h4>
            </div>
          </div>
          <!--法人自然人中心内容-导航-->
          <div class="z-Basic-content">
            <!--法人自然人nav-->
            <ul class="content-nav clearfix">
              <!--<li class="fl ">沟通记录</li>-->
              <!--<li class=" fl mgl">案件</li>-->
              <li class=" fl mgl active">详细资料</li>
              <!--<li class=" fl mgl">联系人</li>-->
              <!--<li class=" fl mgl">日志</li>-->
            </ul>
          </div>

          <!--导航点击事件-->
          <!--点击沟通记录-->
          <!--默认样式-->
          <div class="Communicate">
            <!--显示样式-->
            <ul class="Exhibition">
              <li class="show-list clearfix">
                <span class="name fl"><img src="img/z-name.png" alt=""></span>
                <div class="time fl">
                  <p><span>朱元璋</span><span>微信沟通</span ><span class="col">2017年3月14日 15:48</span></p>
                  <p>内容去玩儿若若</p>
                </div>
                <i class="fl">
                  <a href="JavaScript:void(0); " class="icon1"></a>
                  <a href="JavaScript:void(0);" class="icon2"></a>
                </i>
              </li>
            </ul>
            <!--添加样式-->
            <div class="increase" >
              <div class="increase-top fl">
                <select class="form-control fl ">
                  <option>选择状态</option>
                  <option>确定意向</option>
                  <option>初步沟通</option>
                  <option>商务洽谈</option>
                  <option>售后服务</option>
                  <option>签订成交</option>
                  <option>正式报价</option>
                </select>
                <select class="form-control fl">
                  <option>选择方式</option>
                  <option>邮件沟通</option>
                  <option>微信沟通</option>
                  <option>上门拜访</option>
                  <option>电话沟通</option>
                  <option>商务会议</option>
                </select>
                <input maxlength="50" type="text" class="form-control next fl" placeholder="下次联系">
              </div>
              <div class="fl"><textarea></textarea></div>
              <span class="fr"><a href="JavaScript:void(0);">发送</a></span>
            </div>
          </div>
          <!--点击案件显示-->
          <div class="case">
            <ul>
              <li class="clearfix">
                <p class="fl">模拟开庭，风险评估，三大范式</p>
                <p class="fr"><span>民事</span><span>一审</span><span>已结案</span></p>
              </li>
            </ul>
          </div>
          <!--点击详细资料显示-->
          <div class="details">
            <!--自然人显示-->
            <form class="w5c-form" name="atteesForm" novalidate role="form" w5c-form-validate="validateOptions">
            <div class="natural-on">
              <dl  class="clearfix" style="padding-top: 10px;">
                <dt class="fl">身份信息<a href="JavaScript:void(0);" ng-click="naturalPerEditInfor($event)"></a></dt>
                <dd class="fl">
                  <i class="fl">姓名：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.name}}</span>
                  <input maxlength="10" type="text" placeholder="" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.name">
                </dd>
                <dd class="fl">
                  <i class="fl">职业：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.profession}}</span>
                  <input maxlength="50" type="text" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.profession">
                </dd>
                <dd class="fl">
                  <i class="fl">身份证：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.identificationNumber}}</span>
                  <input maxlength="18" type="text"   class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.identificationNumber" w5c-dynamic-element  name="identificationNumber" ng-pattern="/(^\d{15}$)|(^\d{17}([0-9]|X)$)/" >
                </dd>
                <dd class="fl">
                  <i class="fl">民族：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.nationality}}</span>
                  <input maxlength="50" type="text"  class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.nationality"/>
                </dd>
                <dd class="fl" style="padding-bottom: 0px;">
                  <i class="fl">性别：</i>
                  <span class="L_naturalPerEditInforC fl">{{gender(editNaturalPersonInfo.sex)}}</span>
                  <div class="radio sexRadio natural L_naturalPerEditInforO fl" style="margin-top: 0;">
                    <label>
                      <input name="gender" ng-model="editNaturalPersonInfo.sex" type="radio" class="ace" value="0">
                      <strong class="lbl"> 男</strong>
                    </label>
                    <label>
                      <input name="gender" ng-model="editNaturalPersonInfo.sex" type="radio" class="ace" value="1" >
                      <strong class="lbl"> 女</strong>
                    </label>
                  </div>
                </dd>
                <dd class="fl">
                  <i class="fl">年龄：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.age}}</span>
                  <input maxlength="3" type="text" placeholder="" class="L_naturalPerEditInforO fl" w5c-dynamic-element ng-model="editNaturalPersonInfo.age" name="age" ng-pattern="/^(?:[1-9]?\d|100)$/">
                </dd>
              </dl>

              <!--基本信息-->
              <dl class="clearfix">
                <dt class="fl">基本信息<!--<a href="JavaScript:void(0);" ng-click="naturalPerEditBaseInfor()"></a>-->
                </dt>
                <dd class="fl">
                  <i class="fl">级别：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.levelName}}</span>
                  <!--<input maxlength="50" type="text" placeholder="" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.levelName">-->
                  <select name="" style="width: 190px;height: 30px;border-radius: 5px;" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.level" ng-options="cg.key as cg.value for cg in levelsPer"><!--id="organizaIndustry"-->
                    <option value="" >请选择</option>
                  </select>
                </dd>
                <dd class="fl">
                  <i class="fl">行业：</i>
                  <span class="L_naturalPerEditInforC fl">{{editNaturalPersonInfo.industryName}}</span>
                  <!--<input maxlength="50" type="text" placeholder="" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.industryName" style="display: none">-->
                  <select name="" style="width: 190px;height: 30px;border-radius: 5px;" class="L_naturalPerEditInforO fl"  ng-model="editNaturalPersonInfo.industryId" ng-options="cg.key as cg.value for cg in tradesPer">
                    <option  value="" >请选择</option>
                  </select>
                </dd>
                <dd class="fl">
                  <i class="fl">工作单位：</i>
                  <span class="fl wdt190 L_naturalPerEditInforC">{{editNaturalPersonInfo.workplace}}</span>
                  <input maxlength="200" type="text" placeholder="" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.workplace">
                </dd>
                <dd class="fl">
                  <i class="fl">住址地：</i>
                  <span  class="fl wdt190 L_naturalPerEditInforC">{{editNaturalPersonInfo.address}}</span>
                  <input maxlength="200"  type="text" placeholder="" class="L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.address">
                </dd>
                <dd class="fl" style="width:100%;" >
                  <i class="fl">客户分组：</i>
                  <span class="fl wdt190 L_naturalPerEditInforC ">
                          <button class="on">{{groupName | limitTo:1}}</button>
                        </span>
                  <select class="form-control L_naturalPerEditInforO fl" ng-model="editNaturalPersonInfo.customerGroupId"
                          ng-options="cg.customerGroupId as cg.customerGroupName for cg in customerList"/>
                </dd>
              </dl>
              <div class="details-bottom L_naturalPerEditInforO">
                <button class="icon" data-dismiss="modal" ng-click="saveEditPersonIdInfor(editNaturalPersonInfo,$event)">保存</button>
                <a href="JavaScript:void(0);" ng-click="naturalPerEditInforCancel()">取消</a>
              </div>
            </div>
            </form>
            <!--机构显示-->
            <div class="mechanism-on" >
              <dl class="clearfix" style="padding-top: 10px;">
                <dt class="fl">身份信息<a href="JavaScript:void(0);" ng-click="organizaEditInfor()"></a></dt>
                <dd class="fl" style="display: inline-block; width:100%">
                  <i class="fl">企业名称：</i>
                  <span style="width: auto" class="L_organizaEditInforC fl">{{editOrganizaInfor.companyname}}</span>
                  <input maxlength="200" type="text"  style="width:460px" class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.companyname">
                </dd>

                <dd >
                  <i class="fl">法人姓名：</i>
                  <span class="L_organizaEditInforC fl">{{editOrganizaInfor.contactname}}</span>
                  <input maxlength="200" type="text" class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.contactname" placeholder={{editOrganizaInfor.contactname}}>
                </dd>
                <dd class="fl">
                  <i class="fl">职务：</i>
                  <span class="L_organizaEditInforC fl">{{editOrganizaInfor.duties}}</span>
                  <input maxlength="200" type="text" class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.duties" placeholder={{editOrganizaInfor.duties}}>
                </dd>
              </dl>


              <dl class="clearfix" style="padding-top: 20px;">
                <dt class="fl">基本信息</dt>
                <dd class="fl">
                  <i class="fl">级别：</i>
                  <span class="L_organizaEditInforC fl">{{editOrganizaInfor.levelName}}</span>
                  <!--<input maxlength="200" type="text"   class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.levelName">-->
                  <select name="" style="width: 190px;height: 30px;border-radius: 5px;" class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.level" ng-options="cg.key as cg.value for cg in levels">
                    <!--<option ng-repeat="level  in levels" value="{{level.value}}" >{{level.name}}</option>-->
                    <option value=""> 请选择</option>
                  </select>
                </dd>
                <dd class="fl">
                  <i class="fl">行业：</i>
                  <span  class="L_organizaEditInforC fl">{{editOrganizaInfor.industryName}}</span>
                  <!--<input maxlength="200" type="text"  class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.industryName">-->
                  <select name="" style="width: 190px;height: 30px;border-radius: 5px;" class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.industryId"  ng-options="cg.key as cg.value for cg in trades"><!--ng-options="cg.value as cg.name for cg in trades"-->
                    <option value=""> 请选择</option>
                    <!--<option ng-repeat="trade in trades"  value="{{trade.value}}">{{trade.name}}</option>-->
                  </select>
                </dd>
                <dd class="fl">
                  <i  class="fl">注册地址：</i>
                  <span  class="fl wdt190 L_organizaEditInforC">{{editOrganizaInfor.address}} </span>
                  <input maxlength="200" type="text"   class="L_organizaEditInforO fl" ng-model="editOrganizaInfor.address">
                </dd>
                <dd class="fl" >
                  <i class="fl">客户分组：</i>
                  <span class="fl wdt190 L_organizaEditInforC">
                          <button class="on">{{groupName2 | limitTo:1}}</button>
                        </span>
                  <select class="form-control L_organizaEditInforO fl" ng-model="editOrganizaInfor.customerGroupId" ng-options="cg.customerGroupId as cg.customerGroupName for cg in customerList">
                    <!--<option ng-repeat="customerGroup in customerList" value="{{customerGroup.customerGroupId}}">{{customerGroup.customerGroupName}}</option>-->
                  </select>
                </dd>
              </dl>
              <span class="details-bottom L_organizaEditInforO">
                      <button class="icon" data-dismiss="modal" ng-click="saveEditOrganizaInfor(editOrganizaInfor)">保存</button>
                      <a href="JavaScript:void(0);" ng-click="organizaEditInforCancel()">取消</a>
                    </span>
            </div>
          </div>
          <!--点击联系人-->
          <div  class="contact" >
            <!--默认-->
            <div class="contact-add">
              <a href="JavaScript:void(0);">添加联系人</a>
            </div>
            <!--显示-->
            <div >
              <ul class="contact-top" >
                <li class="contact-dis">
                  <p>
                    <img src="img/z-contact.png" alt="">
                    <span class="name">朱元璋</span>
                    <a href="JavaScript:void(0);" class="pop floatR"></a>
                    <a href="JavaScript:void(0);" class="pen floatR"></a>

                  </p>
                  <p>
                    <span>电话 : 12345678995</span>
                    <span style="padding-left: 130px;">邮箱 : 1234567890@163.com</span>
                  </p>
                </li>
              </ul>
            </div>
            <!--添加样式-->
            <div class="contact-bottom clearfix" >
              <ul class="floatL left-add">
                <li><i>联系人姓名:</i><input maxlength="20" type="text"  class="left-text"></li>
                <li><i>手机号:</i><input maxlength="11" type="text" class="left-text"></li>
              </ul>
              <ul class="floatR right-add">
                <li><i>职务:</i><input maxlength="100" type="text"  class="right-text"></li>
                <li><i>邮箱:</i><input maxlength="50" type="text" class="right-text"></li>
              </ul>
              <p class="long"><i>注册地址:</i><input maxlength="200" type="text" class="long-text"></p>
              <p class="floatR contact-btn"><a href="JavaScript:void(0);">取消</a><a href="JavaScript:void(0);" class="icon">保存</a></p>

            </div>
          </div>
          <!--点击日志显示-->
          <div class="Journal" >
            <ul>
              <li class="Journal-list clearfix">
                <div class="name fl"><img src="img/z-name.png" alt=""></div>
                <div class="time fl">
                  <div class="col">23:51</div>
                  <div>朱元璋 设定下次联系客户时间<span class="col">2017年3月1日 23:50</span></div>
                </div>
              </li>
            </ul>
          </div>
        </div>
        <!--右边栏-->
        <div class="z-Basic-right floatR">
          <a href="JavaScript:void(0);"  data-dismiss="modal" ng-click="naturalPerEditInforCancel()"><!--ng-click="editPersonClose()"-->
            <img src="../../img/z-side.png" alt="">
          </a>
          <!--自然人-->
          <div class="sidebar sidebar-natural ">
            <h4>基本信息</h4>
            <!--<p>状态:<a href="JavaScript:void(0);">官方网站</a></p>-->
            <p>级别:<span>{{editNaturalPersonInfo.levelName}}</span></p>
            <p>行业:<span>{{editNaturalPersonInfo.industryName}}</span></p>
            <p>住址:<span>{{editNaturalPersonInfo.address}}</span></p>
            <p class="clearfix"><i class="floatL">单位:</i><span class="floatL">{{editNaturalPersonInfo.workplace}}</span></p>
            <p class="clearfix">
              <i class="floatL">客户分组:</i>
              <span class="floatL">
                      <button class="on">{{groupName | limitTo:1}}</button>
                <!--<button class="on">{{editNaturalPersonInfo | limitTo:1}}</button>-->
                    </span>
            </p>
          </div>
          <!--机构-->
          <div class="sidebar sidebar-mechanism">
            <h4>基本信息</h4>
            <!--<p>状态:<a href="JavaScript:void(0);">官方网站</a></p>-->
            <p>级别:<span>{{editOrganizaInfor.levelName}}</span></p>
            <p>法人姓名:<span>{{editOrganizaInfor.contactname}}</span></p>
            <!--<p>级别:<span>VIP客户</span></p>-->
            <p>行业:<span>{{editOrganizaInfor.industryName}}</span></p>
            <p>注册地址:<span>{{editOrganizaInfor.address}}</span></p>
            <p class="clearfix">
              <i class="floatL">客户分组:</i>
              <span class="floatL">
                      <button class="on">{{groupName2 | limitTo:1}}</button>
                    </span>
            </p>
          </div>
        </div>
      </div>
      <!--</div>-->
    </div>
  </div>
</div>




<script>
  $(window).ready(function () {
    /*设置屏幕高度*/
    setHeight();
    function setHeight() {
      var height = $(window).height()-200 + 'px';

      var gTeamListHeight = $(window).height()-100 + 'px';
      var minHeight = $(window).height()-140 + 'px';
      var maxHeight = $(window).height()-60 + 'px';
//        $(".gTeamList").css("height",height);
      $(".y-content-box").css("height",minHeight);
      $(".y-team").css("height",maxHeight);
      $(".wrap").css("height",maxHeight);
      $(".y-content2-lawyer").css("height",height);
    };
    $(window).resize(function() {
      setHeight();
    });

  })
</script>
